package com.open.capacity.notice.enums;

import java.util.Map;

import com.baomidou.mybatisplus.annotation.EnumValue;

import lombok.Getter;

@Getter
public enum SendMessageOperateType implements BaseEnum<SendMessageOperateType> {

	NEW_JOB(11, "新建任务"),

	SPLIT_JOB(12, "拆分任务"),

	CANCEL_JOB(20, "取消任务"),

	SUCCESS(13, "完成任务"),

	FAILURE(14, "手工取消订单"),;

	@EnumValue
	private Integer code;
	private String name;

	SendMessageOperateType(int code, String name) {
		this.code = code;
		this.name = name;
	}

	public static SendMessageJobStatus of(Integer code) {
		return BaseEnum.parseByCode(SendMessageJobStatus.class, code);
	}

	public static Map<Integer, String> toMap() {
		return BaseEnum.toMap(SendMessageJobStatus.class);
	}
}
